package com.geek.factory.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.geek.factory.entity.Productx;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ProductxMapper extends BaseMapper<Productx> {
    /*@Select("<script>" +
            "SELECT * FROM products WHERE 1=1 " +
            "<if test='query.name != null and query.name != \"\"'>" +
            "AND name LIKE CONCAT('%', #{query.name}, '%') " +
            "</if>" +
            "<if test='query.model != null and query.model != \"\"'>" +
            "AND model LIKE CONCAT('%', #{query.model}, '%') " +
            "</if>" +
            "<if test='query.category != null and query.category != \"\"'>" +
            "AND category = #{query.category} " +
            "</if>" +
            "<if test='query.minPrice != null'>" +
            "AND price >= #{query.minPrice} " +
            "</if>" +
            "<if test='query.maxPrice != null'>" +
            "AND price <= #{query.maxPrice} " +
            "</if>" +
            "ORDER BY id DESC" +
            "</script>")
    IPage<Product> selectProductPage(Page<Product> page, @Param("query") ProductQueryVO query);*/

}
